#ifndef _ORIGINATOR_H_
#define _ORIGINATOR_H_

#include "Memento.h"

#include <string>
using std::string;

class Originator
{
public:
    string GetState() const {
        return _state;
    }

    void SetState(const string& state) {
        _state = state;
    }

    Memento SaveStateMemento() {
        return Memento(_state);
    }

    void GetStateFromMemento(Memento memento) {
        _state = memento.GetState();
    }
private:
    string _state;
};

#endif // _ORIGINATOR_H_